package com.vcredit.creditcat.manager;

import java.util.List;

import org.springframework.stereotype.Component;

import com.alibaba.dubbo.config.annotation.Reference;
import com.vcredit.creditcat.api.ICreditAssureManager;
import com.vcredit.creditcat.api.IForeignTradeComplianceManager;
import com.vcredit.creditcat.model.CreditAssure;

/**
 * 机构版征信后台任务管理器
 */
@Component
public class CreditAssureTimaManager {

	@Reference(version = "1.0")
    private ICreditAssureManager creditAssureManager;
	@Reference(version = "1.0")
    private IForeignTradeComplianceManager foreignTradeManager;
	
	public List<CreditAssure> find(CreditAssure creditAssure) {		
		return creditAssureManager.find(creditAssure);
	}
	
	public void updateAssure(CreditAssure creditAssure) {		
		creditAssureManager.updateAssure(creditAssure);
	}
	
	public List<CreditAssure> findCanAssure() {
		return creditAssureManager.findCanAssure();
	}
	
	
	public List<CreditAssure> findToSubmitAssure() {
		return creditAssureManager.findToSubmitAssure();
	}

	
	public List<CreditAssure> findToGetReport() {
		return creditAssureManager.findToGetReport();
	}

	
	public List<CreditAssure> findToComplianceQuery() {
		return creditAssureManager.findToComplianceQuery();
	}
	
	public void apply(CreditAssure ca) throws Exception{
		foreignTradeManager.apply(ca);
	}
	
	public void getResult(String state,CreditAssure ca) throws Exception{
		foreignTradeManager.getResult(state,ca);
	}

	public void toGetResult(CreditAssure ca) throws Exception {
		foreignTradeManager.toGetResult(ca);		
	}

	public void assureSubmit(CreditAssure ca) throws Exception {
		foreignTradeManager.creditSubmit(ca);		
	}

	public List<CreditAssure> findToPreAudit() {
		return creditAssureManager.findToPreAudit();
	}

	public void preAudit(CreditAssure ca) throws Exception {
		foreignTradeManager.preAudit(ca);
		
	}
}
